package com.ruoyi.manager.mapper;

import org.apache.ibatis.annotations.*;

@Mapper
public interface PlaceStrategyMapper {

    @Insert("insert into t_strategy_place(strategy_id,place_id) values(#{strategyId},#{placeId})")
    void insert(@Param("strategyId") Integer strategyId, @Param("placeId") Integer id);

    @Update("update t_strategy_place set strategy_id=#{strategyId} where place_id=#{id}")
    void updateByPlaceId(@Param("strategyId") Integer strategyId, @Param("id") Integer id);

    @Select("select count(0) from t_strategy_place where place_id=#{id}")
    int selectSumByPlaceId(Integer id);

    @Select("select strategy_id from t_strategy_place where place_id= #{id}")
    Integer selectstrategyIdByPlaceId(Integer id);
}
